package com.le.tester.book.effectivejava3rdchinese.secondReading.l10;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * createTime：2024-08-15 13:35
 * description：
 */
public class CounterPoint extends Point {

    private static final AtomicInteger counter = new AtomicInteger();

    public CounterPoint(int x, int y) {
        super(x, y);
        counter.incrementAndGet();
    }

    public static int numberCreated() {
        return counter.get();
    }
}
